package com.learning.JavaSE.module1.task4;

import java.util.Scanner;

public class IfElseifElseTest {
    public static void main(String[] args) {
        System.out.println("请输入您的身份信息：");
        Scanner sc = new Scanner(System.in);
        String str = sc.next();

        if("军人".equals(str)){
            System.out.println("请免费乘车");
        } else if ("学生".equals(str)){
            System.out.println("请购买半价票");
        }else {
            System.out.println("请购买全价票");
        }
    }
}
